<?php
/**
 * Created by 张彪.
 * User: 小马出行
 * Date: 2017/10/26
 * Time: 10:39
 */

namespace app\api\model;


use my\Define;
use think\Db;
use think\Model;

class InformModel extends Model
{


    public function __construct()
    {
        parent::__construct();

    }

    public function createInform($data)
    {
        return Db::name('inform')->insertGetId($data);
    }

    public function getInformList($p,$map=array(),$limit=2,$field='*',$order = 'id desc')
    {
        return Db::name('inform')->where($map)->order($order)->field($field)->page($p,$limit)->select();
    }

}